package com.demo2;

import java.util.Date;

/**
 * <p><em>Created on 2021/1/28 9:31</em></p>
 *
 * @author x
 * @since 1.0.1
 */
public class Client {
    public static void main(String[] args) {
        Date date = new Date();
        DateFormatterContext formatter = new DateFormatterContext(DateFormatterStrategy.BELGIUM);
        System.out.println("Belgium: " + formatter.format(date));

        formatter.setStrategy(DateFormatterStrategy.BRAZIL);
        System.out.println("Brazil: " + formatter.format(date));

        formatter.setStrategy(DateFormatterStrategy.US);
        System.out.println("US: " + formatter.format(date));
    }
}
